<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="model.beans.Topic"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no"">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->

    <title >发布话题</title>
    <!-- 1.9.1的JQuery文件 -->
    <script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <link href="css/index.css" rel="stylesheet">    <!-- 不能直接引用该文件 -->
    <link href="css/lljk.css" rel="stylesheet">
    <link href="css/hw.css" rel="stylesheet">
    <link rel="shortcut icon" href="images/pageLogo.ico" />
    <!-- 字体链接 -->
    <link href='http://cdn.webfont.youziku.com/webfonts/nomal/107163/19607/59a17d22f629d811947c75cd.css' rel='stylesheet' type='text/css' />

<!-- 圣诞节限时雪花效果-开始 -->
<!-- <script src="js/snow.js">
</script> -->
<!-- 圣诞节限时雪花效果-结束 -->
</head>
<%!Topic topic = null; %>
<%	

%>

  <body style="padding-top:94px;">

        <!-- 导航条 -->
        <nav class="navbar navbar-default navbar-inverse navbar-fixed-top" id="navigation">
          <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-menu" >
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              <a class="navbar-brand" style="font-family:'hdjxingshucc3fa15f21a29b'; color:white;">琳琅工作室</a> 
              <img class="visible-md visible-lg"  src="images/LOGO_S.png" style="position:absolute;height:70%;left:2%;top:4%;">  
            </div><!--  /navbar-header -->

           <div class="collapse navbar-collapse" id="main-menu">
            <ul class="nav navbar-nav navbar-form navbar-right" id="nav-form">
              <li><a href="index.html"><span class="glyphicon glyphicon-asterisk"> </span>琳琅首页</a></li>
              <li><a href="allTopic.jsp"><span class="glyphicon glyphicon-road"> </span> 查看所有话题</a></li>
              <li><a href="publish.jsp"><span class="glyphicon glyphicon-magnet"> </span>发布话题</a></li>
               <form action="info.jsp" method="get" ><input type="text" class="form-control visible-xs" placeholder="QQ号搜索话题" aria-describedby="basic-addon1" name="qq" ></form>
            </ul>
            </div><!-- /collapse navbar-collapse -->
          </div><!-- /container-fluid -->
        </nav>

        <div class="container">
          <div class="form-group">
              <form method="get" action="servlet/Publish" onsubmit="return check();">
                <!--QQ-->
                <div class="input-group input-group-lg">
                  <span class="input-group-addon" id="sizing-addon1">Q Q</span>
                  <input type="text" class="form-control" name="qq" id="qq">
                </div>
                <hr>
                <!--权限密码-->
                <div class="input-group input-group-lg">
                  <span class="input-group-addon" id="sizing-addon1">口令</span>
                  <input type="text" class="form-control" name="pwd" id="pwd" placeholder="4位数口令将用于删除话题">
                </div>
                <hr>
                <!--标题-->
                <div class="input-group input-group-lg">
                  <span class="input-group-addon" id="sizing-addon1">标题</label></span>
                  <input type="text" class="form-control" name="title" id="title" >
                </div>
                <hr>
                <!--内容-->
      
                  <textarea id="content" class="form-control" name="content" id="content" style="height:300px;"> </textarea>

                <!--确认按键-->
                <hr/>
                <button type="submit" class="btn btn-success btn-lg btn-block">发布</button>
              </form>
          </div><!--form-group-->
        </div><!-- /container -->
        
  <!-- CopyrightNotice -->
 <div id="CopyrightNotice" class="text-center">Copyright © 
        <a target="_blank" href="http://www.flyingocean.cn/" style="text-decoration:none">FlyingOcean</a>
 </div>
 <span><strong>累计访问量（PV）</strong></span>
<!-- GoStats JavaScript Based Code -->
<script type="text/javascript" src="http://gostats.cn/js/counter.js"></script>
<script type="text/javascript">_gos='monster.gostats.cn';_goa=494280;
_got=7;_goi=16;_goz=0;_god='hits';_gol='客流计数器';_GoStatsRun();</script>
<noscript><a target="_blank" title="客流计数器" 
href="http://gostats.cn"><img alt="客流计数器" 
src="http://monster.gostats.cn/bin/count/a_494280/t_7/i_16/z_0/show_hits/counter.png" 
style="border-width:0" /></a></noscript>
<!-- End GoStats JavaScript Based Code -->
        
    </body>
    <script language="javascript">
    	function check(){
    		var qq = document.getElementById("qq").value;
        	var title = document.getElementById("title").value;
        	var content = document.getElementById("content").value;
        	var pwd = document.getElementById("pwd").value;
        	//为空校验
        	if(qq==''||title==''||content==''||pwd==''){
        		alert("表单不能有空项!");
        		return false;
        	}	
        	//长度检验
        	var reg = /^[0-9a-zA-Z!@#$%^&*]{4}$/;         	
        	
        	if(!reg.test(pwd)){
        		alert("密码不合法!4位数字字母符号(!@#$%^&*)");
        		return false;
        	} 
        	return true;
    	}
    </script>
</html>